<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>if语句</title>
<script language="javascript" type="text/javascript">
var num=Number(prompt("请输入一个0-100之间的数字",""));
	if(isNaN(num))
		document.write("你输入的不是数字，请确认你的输入。");
	else if(num<0 || num>100)
			document.write("你输入的数字范围不在0-100之间。");
		else
			document.write("你输入的数字是："+num);

</script>
</head>

<body>
</body>
</html>
